1. Field of the Invention
The present invention relates to a memory system including a nonvolatile semiconductor memory device, for example, a NAND-type flash memory, and more particularly to a method of controlling the same.
2. Description of the Related Art
Recently, electronic apparatuses, such as digital cameras and portable audio devices, have been configured such that memory cards are attachable to these electronic apparatuses. Photographic data and music data can be stored in the memory card. The memory card includes, for example, a NAND-type flash memory, and various data is written in the flash memory.
In the digital camera or portable audio device which functions as a host device that uses the memory card, a logical block address (LBA) is assigned to each data block having a data size of a small block (528 bytes×32 pages), and data write is executed in units of the LBA. On the other hand, the controller of the memory card writes the data in a large block (2112 bytes×128 pages) of the NAND-type flash memory. At this time, the controller assigns one large block to 16 LBAs, and writes the data in the large block in the order of LBAs. When the LBAs are consecutive, the data is successively written in the assigned large block by an additional write scheme. However, if LBAs, which are supplied from the host device, are inconsecutive, the data cannot successively be written in the large block. Thus, the controller newly assigns another empty large block, writes the data of the inconsecutive LBA in the newly assigned large block, and transfers the already written data to a new large block. Thereafter, the data, which is written in the old large block, is erased. In this manner, in the case of writing data with inconsecutive LBAs, it is necessary to assign a new large block and transfer already written data to the new large block, and there arises such a problem that the write time increases and the write performance of the memory card deteriorates. Under the circumstances, there has been a demand for a method of controlling the memory system, which can reduce the write time and suppress deterioration in write performance of the memory card.
Jpn. Pat. Appln. KOKAI Publication No. 2005-222228 discloses a memory card which enables access to the memory card even in the case where the block size of a write unit or an erase unit, for example, the erase unit, in a flash memory mounted on the memory card is increased.